package data.platform.merge.model;


import data.platform.common.merge.MergePeriod;
import lombok.Getter;
import lombok.Setter;

import java.util.Objects;

@Getter
@Setter
public class MergeItem {

    // column 1
    private String moType;

    // column 2
    private String metric;

    // column 3
    private String mergedMetric;

    // column 4
    private MergePeriod mergePeriod;

    //  column5
    private MergeType mergeType;

    // column6 算法名称
    private String arithmetic;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MergeItem mergeItem = (MergeItem) o;
        return Objects.equals(moType, mergeItem.moType) && Objects.equals(metric, mergeItem.metric) && mergePeriod == mergeItem.mergePeriod && mergeType == mergeItem.mergeType;
    }

    @Override
    public int hashCode() {
        return Objects.hash(moType, metric, mergePeriod, mergeType);
    }

    @Override
    public String toString() {
        return "MergeItem{" +
                "moType='" + moType + '\'' +
                ", metric='" + metric + '\'' +
                ", mergedMetric='" + mergedMetric + '\'' +
                ", mergePeriod=" + mergePeriod +
                ", mergeType=" + mergeType +
                ", arithmetic='" + arithmetic + '\'' +
                '}';
    }
}
